package com.lagou.homework3.no5;

import java.util.ArrayList;
import java.util.List;

public class CardMain {
    public static void main(String[] args) {
        ArrayList<String> poker=new ArrayList<String>();//创建一个ArrayList集合来存储扑克牌
        String[] colors= {"♠","♥","♦","♣"};//四种花色
        String[] numbers={"3","4","5","6","7","8","9","10","11","12","13","14","15"};//从A到K  11-J 12-Q 13-K 14-A 15-2

        //这里我们new一个斗地主，使用构造方法创建一个实例对象
        PlayCards playCards=new PlayCards(poker,colors,numbers);

        //再创建一个ArrayList集合去接收54张牌
        List<String> cards=playCards.savecard();

        //获取三位玩家各自的17张牌，以及3张底牌
        List<String> player1=playCards.licensing(1,cards);
        List<String> player2=playCards.licensing(2,cards);
        List<String> player3=playCards.licensing(3,cards);
        List<String> basepoker=playCards.licensing(4,cards);

        //输出本次斗地主三位玩家分到的牌，以及3张底牌
        System.out.println("player1：" + playCards.sorting(player1));
        System.out.println("player2：" + playCards.sorting(player2));
        System.out.println("player3：" + playCards.sorting(player3));
        System.out.println("basepoker：" + playCards.sorting(basepoker));

    }
}
